[−][src]Crate jni_glue
Common glue code between Rust and JNI, used in autogenerated jni-bindgen glue code.
See also the Android JNI tips documentation as well as the Java Native Interface Specification.
Structs
Argument | FFI: Use Argument<java::lang::Object> instead of jobject. This represents a (null?) function argument. |
BooleanArray | A PrimitiveArray implementation. |
ByteArray | A PrimitiveArray implementation. |
CharArray | A PrimitiveArray implementation. |
DoubleArray | A PrimitiveArray implementation. |
Env | FFI: Use &Env instead of *const JNIEnv. This represents a per-thread Java exection environment. |
FloatArray | A PrimitiveArray implementation. |
Global | |
IntArray | A PrimitiveArray implementation. |
Local | A Local, non-null, reference to a Java object (+ &Env) limited to the current thread/stack. |
LongArray | A PrimitiveArray implementation. |
ObjectArray | A Java Array of reference types (classes, interfaces, other arrays, etc.) |
ObjectArrayIter | |
Ref | A non-null, reference to a Java object (+ &Env). This may refer to a Local, Global, local Argument, etc. |
ShortArray | A PrimitiveArray implementation. |
StringChars | Represents an env.GetStringChars + env.GetStringLength query. Will automatically env.ReleaseStringChars when dropped. |
VM | FFI: Use &VM instead of *const JavaVM. This represents a global, process-wide Java exection environment. |
jchar | Represents a Java "UTF16" code unit. This is not guaranteed to actually be a valid code unit, and should be treated much like wchar_t is treated by Rust - encoded possibly as WTF8 rather than UTF8, laden with error checking when converting to Rust character/string types, etc. |
Traits
JniType | JNI bindings rely on this type being accurate. |
PrimitiveArray | A Java Array of some POD-like type such as bool, jbyte, jchar, jshort, jint, jlong, jfloat, or jdouble. |
ThrowableType | A marker type indicating this is a valid exception type that all exceptions thrown by java should be compatible with |
Functions
JNI_OnLoad⚠ | Do not call! Automatically invoked by the JVM. See "unsafe-manual-jni-load-unload" to override this behavior. |
JNI_OnUnload | Do not call! Automatically invoked by the JVM. See "unsafe-manual-jni-load-unload" to override this behavior. |
Type Definitions
ArgumentRef | A Local, non-null, reference to a Java object (+ &Env). |
GlobalRef | A Global, non-null, reference to a Java object (+ &Env). |